package com.thrd.taiexhibition.activity;

import android.view.View;
import android.widget.TextView;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.thrd.taiexhibition.R;
import com.thrd.taiexhibition.base.BackTitleActivity;
import com.thrd.taiexhibition.bean.BeanThemeIe;
import com.thrd.taiexhibition.fresco.FrescoImage;
import com.thrd.taiexhibition.fresco.FrescoUtils;
import com.thrd.taiexhibition.presener.CityIndustryDetailCompanyPresener;

/**
 * @author: ${唐杰}
 * @date: 2021/3/23
 */
@Route(path = "/app/tda",group = "app")
public  class ThemeDynamicActivity extends BackTitleActivity  {
    @Autowired(name="BeanThemeIe")
    BeanThemeIe mBeanThemeIe;

    private TextView mSkip;
    private FrescoImage mFrescoImage;
    private CityIndustryDetailCompanyPresener mCityIndustryDetailCompanyPresener;

    @Override
    public int getLayout() {
        return R.layout.activity_theme_dynamic;
    }

    @Override
    protected void initView() {
        mFrescoImage = (FrescoImage) findViewById(R.id.fi_image);
        mSkip = (TextView) findViewById(R.id.tv_skip);
      //  FrescoUtils.getInstance().setProgressLoad(this, mFrescoImage,"https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fa0.att.hudong.com%2F52%2F62%2F31300542679117141195629117826.jpg&refer=http%3A%2F%2Fa0.att.hudong.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1617957005&t=aa3f8869f752afd2daeb0ee367cd6ad4");
    }

    @Override
    public void initData() {


      //  ARouter.getInstance().build("/app/tda") .navigation();
        if(mBeanThemeIe!=null){
           // LogUtil.e("BeanThemeIe","BeanThemeIe!=null");
            FrescoUtils.getInstance().setPrefixProgressLoad(ThemeDynamicActivity.this,mFrescoImage,mBeanThemeIe.getIemovecoverimgs());

        }
    }

    @Override
    public void initEvent() {
        mSkip.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ARouter.getInstance().build("/app/tiha") .withLong("id",mBeanThemeIe.getId()).navigation();
            }
        });
    }


}
